import {createApp} from 'vue'
import App from './App'
import router from '#/router';
import ui from 'element-plus'
import '#/utils/axios';
import '@/assets/styles/index.scss'
import 'element-plus/dist/index.css'
import store from '#/store'
import shared from '~'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'

import * as echarts from 'echarts';

import * as ElementPlusIconsVue from '@element-plus/icons-vue'

import {initEnv} from '#/env';

initEnv();

const app = createApp(App)

// 全局icon注入
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

for (const [key, component] of Object.entries(echarts)) {
    app.component(key, component)
}

app.use(ui,{locale: zhCn,})
    .use(router)
    .use(store)
    .use(shared)
    .mount('#app')

